<template>
	<div class="content">
		<common-head :showIcon="false"></common-head>
		<div class="container">
			<orderInfo :parkData="parkData" :parkData1="parkData1" />
			<!-- 添加orderInfo组件 -->
		</div>
	</div>
</template>
<script>
	import commonHead from "../../components/xc/commonHead.vue";
	import orderInfo from "./orderInfo.vue";
	export default {
		components: {
			commonHead,
			orderInfo
		},
		data() {
			return {
				parkData: {},
				parkData1: { // 定义默认结构
					parking_spot: '',
					berth: ''
				}
			};
		},
		mounted() {
			if (this.$route.query) {
				this.parkData = this.$route.query
			}
		},
		created() {  // 使用 created 钩子
		    if (this.$route.query) {
		      this.parkData1 = {
		        ...this.parkData1,  // 保留默认结构
		        ...this.$route.query  // 覆盖路由参数
		      };
		    }
		  }
	};
</script>
<style lang="less" scoped>
	.content {
		height: 100vh;
	}

	.container {
		height: 100%;
		width: 100%;
		padding: 10px;
		background-image: linear-gradient(to right, #cee7ff, #a5d3ff);
	}
</style>